/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package syntaxtree;

/**
 *
 * @author laurent
 */
public class Tabulation {
    
     public static Tabulation getInstance() {
        if (null == instance) { // Premier appel
            instance = new Tabulation();
        }
        return instance;
    }
    
    private Tabulation(){}
    private static Tabulation instance;
    
    private static int t = 0;
    
    public static String tabulate(){
        String tab="";
        for (int i=0;i<t;i++)
            tab+="\t";
        return tab;
    }
    public static int getT(){return t;}
    public static void addTab(){
        if (t<10)t++;}
    public static void redTab(){if(t>0)t--;}
    
}
